package net.sk.china.city.talk.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.sk.china.city.talk.service.CallbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * +----------------------------------------------------------------------
 * | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2018-2024 聊来All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * +----------------------------------------------------------------------
 * | @Author: 聊来 <18970881148@qq.com>
 * +----------------------------------------------------------------------
 * | DateTime: 2024/6/2 22:27
 * +----------------------------------------------------------------------
 */

@RestController
@RequestMapping(value = "notify/")
@Api(tags = "支付回调")
public class NotifyController {

    private final CallbackService callbackService;

    @Autowired
    public NotifyController(CallbackService callbackService) {
        this.callbackService = callbackService;
    }


    @ApiOperation(value = "微信退款回调")
    @RequestMapping(value = "refund/weChat", method = RequestMethod.POST)
    public String weChatRefund(@RequestBody String request) { return callbackService.weChatRefund(request); }
}
